package com.webflux.tm.webflux.module.logic.mysql.controller;


import com.webflux.tm.webflux.module.basemodel.Result;
import com.webflux.tm.webflux.module.basemodel.ResultGenerator;
import com.webflux.tm.webflux.module.logic.mysql.handler.ShDeviceHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 设备表 前端控制器
 * </p>
 *
 * @author Surging
 * @since 2023-05-09
 */
@RestController
@RequestMapping("/mysql/shDevice")
public class ShDeviceController {
    
    @Autowired
    private ShDeviceHandler shDeviceHandler;

    //查询sh_device表中的所有数据
    //http://localhost:9999/mysql/shDevice/list
    @GetMapping("/list")
    public Result listAllDevices(){
        return ResultGenerator.getSuccessResult(shDeviceHandler.listAllDevices());
    }
}
